<div ng-controller="PatientDetailsCtrl">
    <div class="modal-header">
        <h3 class="modal-title" translate="{{ 'business.navtitle.patcaseinfo' }}"></h3>
    </div>
    <div class="modal-body" ng-controller="AddPatientCaseCtrl">
                <accordion close-others="oneAtATime" ng-init="getPatientCases(patient.patient_Id)">
                    <accordion-group ng-repeat="item in ArrPatCases  track by $index"  is-open="item.isedit">
                        <accordion-heading>
                            {{item.title}}
                            <small class="pull-right">Edited At: {{item.updatedF}}</small>
                        </accordion-heading>
                        <form role="patcase" ng-submit="savePatientCase(item)">
                            <div class="form-group">
                                <label>{{ 'business.patcase.brief_Desc' | translate }}</label>
                                <input type="text" ng-model="item.brief_Desc" class="form-control" ng-disabled="viewOnly" autocomplete="off">
                            </div>
                            <div class="form-group">
                                <label>{{ 'business.patcase.main_Desc' | translate }}</label>
                                <textarea rows="3" ng-model="item.main_Desc" class="form-control" style="overflow:auto;height:100px;max-height:100px"  ng-disabled="viewOnly"></textarea>
                            </div>
                            <div class="form-group">
                                <div class="row">
                                    <label class="col-sm-2 control-label">{{ 'business.patcase.spirit_State' | translate
                                        }}</label>

                                    <div class="col-sm-4">
                                        <label>
                                            <input type="radio" name="spirit_state" ng-model="item.spirit_State" value="verygood"  ng-disabled="viewOnly">
                                            {{ 'common.verygood' | translate }}
                                        </label>
                                        <label>
                                            <input type="radio" name="spirit_state" ng-model="item.spirit_State" value="notgood"  ng-disabled="viewOnly">
                                            {{ 'common.notgood' | translate }}
                                        </label>
                                    </div>
                                    <label class="col-sm-2 control-label">{{ 'business.patcase.strength' | translate
                                        }}</label>

                                    <div class="col-sm-4">
                                        <label>
                                            <input type="radio" name="strength" ng-model="item.strength" value="verygood"  ng-disabled="viewOnly">
                                            {{ 'common.verygood' | translate }}
                                        </label>
                                        <label>
                                            <input type="radio" name="strength" ng-model="item.strength" value="notgood"  ng-disabled="viewOnly">
                                            {{ 'common.notgood' | translate }}
                                        </label>
                                    </div>
                                </div>
                            </div>

                            <div class="line line-dashed b-b line-lg pull-in"></div>
                            <div class="form-group">
                                <div class="row">
                                    <label class="col-sm-2 control-label">{{ 'business.patcase.appetite' | translate
                                        }}</label>

                                    <div class="col-sm-4">
                                        <label>
                                            <input type="radio" name="appetite" ng-model="item.appetite" value="verygood"  ng-disabled="viewOnly">
                                            {{ 'common.verygood' | translate }}
                                        </label>
                                        <label>
                                            <input type="radio" name="appetite" ng-model="item.appetite" value="good"  ng-disabled="viewOnly">
                                            {{ 'common.good' | translate }}
                                        </label>
                                        <label>
                                            <input type="radio" name="appetite" ng-model="item.appetite" value="notgood"  ng-disabled="viewOnly">
                                            {{ 'common.notgood' | translate }}
                                        </label>
                                    </div>
                                    <label class="col-sm-2 control-label">{{ 'business.patcase.sleeping' | translate
                                        }}</label>

                                    <div class="col-sm-4">
                                        <label>
                                            <input type="radio" name="sleeping" ng-model="item.sleeping" value="verygood"  ng-disabled="viewOnly">
                                            {{ 'common.verygood' | translate }}
                                        </label>
                                        <label>
                                            <input type="radio" name="sleeping" ng-model="item.sleeping" value="good"  ng-disabled="viewOnly">
                                            {{ 'common.good' | translate }}
                                        </label>
                                        <label>
                                            <input type="radio" name="sleeping" ng-model="item.sleeping" value="notgood" ng-disabled="viewOnly">
                                            {{ 'common.notgood' | translate }}
                                        </label>
                                    </div>
                                </div>
                            </div>

                            <div class="line line-dashed b-b line-lg pull-in"></div>
                            <div class="form-group">
                                <div class="row">
                                    <label class="col-sm-2 control-label">{{ 'business.patcase.gatism_Handling' | translate
                                        }}</label>

                                    <div class="col-sm-4">
                                        <label>
                                            <input type="radio" name="gatism_handling" ng-model="item.gatism_Handling" value="usual"  ng-disabled="viewOnly">
                                            {{ 'common.usual' | translate }}
                                        </label>
                                        <label>
                                            <input type="radio" name="gatism_handling" ng-model="item.gatism_Handling" value="stool_usual"  ng-disabled="viewOnly">
                                            {{ 'business.patcase.gatHand_stool' | translate }}
                                        </label>
                                        <label>
                                            <input type="radio" name="gatism_handling" ng-model="item.gatism_Handling" value="urine_usual"  ng-disabled="viewOnly">
                                            {{ 'business.patcase.gatHand_urine' | translate }}
                                        </label>
                                    </div>
                                    <label class="col-sm-2 control-label">{{ 'business.patcase.method_Transport' | translate
                                        }}</label>

                                    <div class="col-sm-4">
                                        <label>
                                            <input type="radio" name="method_transport" ng-model="item.method_Transport" value="usual"  ng-disabled="viewOnly">
                                            {{ 'common.usual' | translate }}
                                        </label>
                                        <label>
                                            <input type="radio" name="method_transport" ng-model="item.method_Transport" value="wheelchair"  ng-disabled="viewOnly">
                                            {{ 'business.patcase.metTran_wheelchair' | translate }}
                                        </label>
                                        <label>
                                            <input type="radio" name="method_transport" ng-model="item.method_Transport" value="ambulance"  ng-disabled="viewOnly">
                                            {{ 'business.patcase.metTran_ambulance' | translate }}
                                        </label>
                                    </div>
                                </div>
                            </div>

                            <div class="line line-dashed b-b line-lg pull-in"></div>
                            <div class="form-group">
                                <div class="row">
                                    <label class="col-sm-2">{{ 'business.patcase.body_Temp' | translate }} </label>
                                    <div class="col-sm-10">
                                        <div class="input-group">
                                            <input pattern="^([0-9]*[1-9][0-9]*(\.[0-9]+)?|[0]+\.[0-9]*[1-9][0-9]*)$" title="Number must greater than 0" type="text" class="form-control" ng-model="item.body_Temp"  ng-disabled="viewOnly" autocomplete="off">
                                            <span class="input-group-btn">
                                                <button class="btn btn-default" type="button">{{ 'common.degree' | translate }}</button>
                                            </span>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <label class="col-sm-2">{{ 'business.patcase.heart_Beat' | translate }} </label>
                                    <div class="col-sm-10">
                                        <div class="input-group">
                                            <input pattern="^([0-9]*[1-9][0-9]*(\.[0-9]+)?|[0]+\.[0-9]*[1-9][0-9]*)$" title="Number must greater than 0" type="text" class="form-control" ng-model="item.heart_Beat"  ng-disabled="viewOnly" autocomplete="off">
                                            <span class="input-group-btn">
                                                <button class="btn btn-default" type="button">{{ 'common.notimes' | translate }}</button>
                                            </span>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <label class="col-sm-2">{{ 'business.patcase.breath_Int' | translate }} </label>
                                    <div class="col-sm-10">
                                        <div class="input-group">
                                            <input pattern="^([0-9]*[1-9][0-9]*(\.[0-9]+)?|[0]+\.[0-9]*[1-9][0-9]*)$" title="Number must greater than 0" type="text" class="form-control" ng-model="item.breath_Int"  ng-disabled="viewOnly" autocomplete="off">
                                            <span class="input-group-btn">
                                                <button class="btn btn-default" type="button">{{ 'common.notimes' | translate }}</button>
                                            </span>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <label class="col-sm-2">{{ 'business.patcase.weight' | translate }}</label>
                                    <div class="col-sm-4">
                                        <div class="input-group">
                                            <input  pattern="^([0-9]*[1-9][0-9]*(\.[0-9]+)?|[0]+\.[0-9]*[1-9][0-9]*)$" title="Number must greater than 0" type="text" class="form-control" ng-model="item.weight"  ng-disabled="viewOnly" autocomplete="off">
                                            <span class="input-group-btn">
                                                <button class="btn btn-default" type="button">{{ 'common.kg' | translate }}</button>
                                            </span>
                                        </div>
                                    </div>
                                    <label class="col-sm-2">{{ 'business.patcase.weight_change' | translate }}</label>
                                    <div class="col-sm-4">
                                        <div class="input-group">
                                            <input type="number" class="form-control" ng-model="item.weight_Change"  ng-disabled="viewOnly">
                                            <span class="input-group-btn">
                                                <button class="btn btn-default" type="button">{{ 'common.kg' | translate }}</button>
                                            </span>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <label class="col-sm-2">{{ 'business.patcase.bmi' | translate }}</label>
                                    <div class="col-sm-4">
                                        <div class="input-group">
                                            <input pattern="^([0-9]*[1-9][0-9]*(\.[0-9]+)?|[0]+\.[0-9]*[1-9][0-9]*)$" title="Number must greater than 0" type="text" class="form-control" ng-model="item.bmi"  ng-disabled="viewOnly" autocomplete="off">
                                            <span class="input-group-btn">
                                                <button class="btn btn-default" type="button">{{ 'common.kg' | translate }}</button>
                                            </span>
                                        </div>
                                    </div>
                                    <label class="col-sm-2">{{ 'business.patcase.height' | translate }}</label>
                                    <div class="col-sm-4">
                                        <div class="input-group">
                                            <input pattern="^([0-9]*[1-9][0-9]*(\.[0-9]+)?|[0]+\.[0-9]*[1-9][0-9]*)$" title="Number must greater than 0" type="text" class="form-control" ng-model="item.height"  ng-disabled="viewOnly" autocomplete="off">
                                            <span class="input-group-btn">
                                                <button class="btn btn-default" type="button">{{ 'common.cm' | translate }}</button>
                                            </span>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <label class="col-sm-2">{{ 'business.patcase.blood_Pressure_High' | translate }} </label>
                                    <div class="col-sm-4">
                                        <div class="input-group">
                                            <input pattern="^([0-9]*[1-9][0-9]*(\.[0-9]+)?|[0]+\.[0-9]*[1-9][0-9]*)$" title="Number must greater than 0"type="text" class="form-control" ng-model="item.blood_Pressure_High" ng-disabled="viewOnly" autocomplete="off">
                                            <span class="input-group-btn">
                                                <button class="btn btn-default" type="button">{{ 'common.mmHg' | translate }}</button>
                                            </span>
                                        </div>
                                    </div>
                                    <label class="col-sm-2">{{ 'business.patcase.blood_Pressure_Low' | translate }} </label>
                                    <div class="col-sm-4">
                                        <div class="input-group">
                                            <input pattern="^([0-9]*[1-9][0-9]*(\.[0-9]+)?|[0]+\.[0-9]*[1-9][0-9]*)$" title="Number must greater than 0" type="text" class="form-control" ng-model="item.blood_Pressure_Low" ng-disabled="viewOnly" autocomplete="off">
                                            <span class="input-group-btn">
                                                <button class="btn btn-default" type="button">{{ 'common.mmHg' | translate }}</button>
                                            </span>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <footer class="panel-footer text-right bg-light lter">
                                <a class="btn btn-warning" ng-show="item.isedit == true" ng-click="cancelPatientCase(item)" translate="common.cancel">Cancel</a>
                                <a class="btn btn-info pull-left" ng-click="open({ templateUrl: 'setNeedDiag.html', size: 'sm' }, item, 'getSpecialists')" translate="common.sendfordiagnosis">Send for Diagnosis</a>
                                <button class="btn btn-success" type="submit" ng-show="false" translate="common.submit">Submit</button>
                              </footer>
                        </form>
                    </accordion-group>
                </accordion>
                <footer class="panel-footer text-center bg-light lter">
                    <button class="btn btn-cancel" ng-click="cancel()" translate="common.cancel">Cancel</button>
                </footer>

    </div>
</div>